consuming(): IterableIterator<T> | Popup the elements from the queue by the dequeue order. |
count(filter: (element: T) => boolean): number | Count the elements in the queue which matched by the filter. |
dequeue(newElement?: T): T|undefined | Popup the top element, and push the given newElement if it is not undefined . |
enqueue(val: T): void | Push a element into the circular queue. |
enqueues(elements: Iterable<T>): void | Push multiple elements into the circular queue. |
enqueues_advance(elements: ReadonlyArray<T>, start: number, end: number): void | Push multiple elements into the circular queue. |
exclude(filter: (element: T) => boolean): void | Remove elements matched the filter. |
destroy(): void | Destroy the queue and release the memory. |
front(): T|undefined | Get the first enqueued element from the circular queue. |
back(): T|undefined | Get the last enqueued element from the circular queue. |
init(initialElements?: Iterable<T>: void | Initialize circular queue with initial elements. |
resize(MAX_SIZE: number): void | Resize the max-size of queue with the given size. |
rearrange(): void | Rearrange elements, that is, put the first element in place 0-index. |
readonly size: number | Get the number of elements. |
readonly destroyed: number | Indicate whether the circular queue destroyed. |